import pytest
from business.account import Account
from common.public_func import write_log


@pytest.fixture()
def get_token(phone="13012312300", pwd="123456."):
    write_log("========== 前置条件，获取token ==============")
    res = Account().phone_pwd_login(phone, pwd)
    # [状态码，头信息，响应体信息]
    res_body = res[2]
    # print(res_body)
    token = res_body["data"]["token"]
    yield token

# get_token()
